package com.xckj.utils;

import java.util.HashMap;
import java.util.Map;

public class ReturnT {

	public final static String successInfo = "";
	public final static String errorInfo = "";
	public final static String succFlag = "success";
	public final static boolean isSuccTrue = true;
	public final static boolean isSuccFalse = false;

	public static Map<String, Object> error(String error) {
		Map<String, Object> info = new HashMap<String, Object>();
		info.put(succFlag, isSuccFalse);
		info.put(errorInfo, error);
		return info;
	}
	
	public static Map<String, Object> error() {
		Map<String, Object> info = new HashMap<String, Object>();
		info.put(succFlag, isSuccFalse);
		return info;
	}
	
	
	public static Map<String, Object> success(String success) {
		Map<String, Object> info = new HashMap<String, Object>();
		info.put(succFlag, isSuccTrue);
		info.put(successInfo, success);
		return info;
	}
	
	public static Map<String, Object> success() {
		Map<String, Object> info = new HashMap<String, Object>();
		info.put(succFlag, isSuccTrue);
		return info;
	}
	
	public static Map<String, Object> success(boolean isSucc) {
		Map<String, Object> info = new HashMap<String, Object>();
		info.put(succFlag, isSucc);
		return info;
	}
	
	public static Map<String, Object> success(Map<String, Object> info) {
		info.put(succFlag, isSuccTrue);
		return info;
	}
	
	public static Map<String, Object> success(Object success) {
		Map<String, Object> info = new HashMap<String, Object>();
		info.put(succFlag, isSuccTrue);
		info.put(successInfo, success);
		return info;
	}	
	
}
